package com.bracketbird.client.gui.pages;


import com.bracketbird.client.gui.*;
import com.bracketbird.clientcore.appcontrol.*;
import com.bracketbird.clientcore.gui.*;
import com.bracketbird.clientcore.style.*;

/**
 *
 */
public class FrontPage extends Page<FrontPageController> implements TopPanelHolder {

    private VerticalComponent content;
    private HorizontalComponent topLoggedOut;

    public static double LOGO_HEIGHT = 70;
    public static double PAGE_WIDTH = 900;

    public FrontPage() {
        super();
        content = new VerticalComponent();
        initWidget(content);
    }

    public void init() {
        CenterComponent gc = new CenterComponent();

        gc.add(new ImageComponent("front1.png"), new TextLayout(Horizontal.CENTER, Vertical.MIDDLE).paddingTop(20).paddingBottom(20));

        content.add(gc, new TextLayout(0, 0, 0, 0, null, "100%", Horizontal.CENTER, Vertical.MIDDLE).backgroundWhite());

        content.add(new ImageComponent("frontslogans.png"), new TextLayout(Horizontal.CENTER).paddingTop(15));
    }

    protected void setSubPageHolder(Page subPage) {
        //ignore
    }

    public GuiComponent getTopPanel() {
        if (topLoggedOut == null) {
            topLoggedOut = new HorizontalComponent();
            topLoggedOut.add(LogoPanel.getInstance().getPanel(), new TextLayout(LOGO_HEIGHT + "px", PAGE_WIDTH + "px", Horizontal.CENTER));


        }
        return topLoggedOut;
    }





}
